Skip to content

Avoid using OCI8#describe_synonym to use the same code#153

Merged
yahonda merged 1 commit intorsim:masterfrom
yahonda:diag_describe_synonym
Feb 7, 2018
Merged

Avoid using OCI8#describe_synonym to use the same code#153
yahonda merged 1 commit intorsim:masterfrom
yahonda:diag_describe_synonym

Conversation

@yahonda
Copy link
Copy Markdown
Collaborator

@yahonda yahonda commented Feb 7, 2018

between CRuby with ruby-oci8 and JRuby

OCI8#describe_synonym was implemented
to address some performance problem with all_synonyms
but now I do not see any performance regression due to this change.

In the very long term, when ruby-odpi is production ready and
ruby-plsql uses ruby-odpi instead of ruby-oci8,
it will not support OCI8#describe_synonym.
Refer kubo/ruby-oracledb#1 (comment)

Even using ruby-oci8 it will use the same PLSQL::Connection#describe_table
for both CRuby and JRuby connections, which reduces some of code.

between CRuby with ruby-oci8 and JRuby

`OCI8#describe_synonym` was implemented
to address some performance problem with `all_synonyms`
but now I do not see any performance regression due to this change.

In the very long term, when `ruby-odpi` is production ready and
ruby-plsql uses `ruby-odpi` instead of `ruby-oci8`,
it will not support `OCI8#describe_synonym`.
Refer kubo/ruby-oracledb#1 (comment)

Even using ruby-oci8 it will use the same `PLSQL::Connection#describe_table`
for both CRuby and JRuby connections, which reduces some of code.
@yahonda yahonda merged commit dd24c44 into rsim:master Feb 7, 2018
@yahonda yahonda deleted the diag_describe_synonym branch February 7, 2018 11:22
yahonda added a commit to yahonda/ruby-plsql that referenced this pull request Feb 10, 2018
@yahonda yahonda mentioned this pull request May 5, 2026
1 task
yahonda added a commit that referenced this pull request May 5, 2026
Both lines of the comment above PLSQL::Connection#describe_synonym are
no longer true:

- "all_synonyms view is quite slow" — measured against Oracle 23ai with
  a 1500-synonym fixture this method is ~0.43 ms/call, dominated by
  network round-trip rather than the dictionary-view query. The slow
  case the comment was written for (oracle-enhanced #2686 saw 29x on
  private synonyms in a 1000-object schema) doesn't show up at the
  scales ruby-plsql actually exercises.
- "overridden in OCI connection with faster native OCI method" — that
  override was removed in 4d1f656 (2018, "Remove OCI8#describe_synonym
  to follow up #153") because the predecessor commit 1daa6ce already
  deleted its body and made it call super. There is no longer any
  driver-specific override.

The method's name and SQL are self-explanatory; removing both lines
without a replacement keeps the file accurate.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant